Map Business Online SDK
UpdateData(String,String,DataTable,ICancelTracker,UpdateDataOptions,String,FieldCustomization[]) Method

MBO.Server Namespace > IServer Interface > UpdateData Method : UpdateData(String,String,DataTable,ICancelTracker,UpdateDataOptions,String,FieldCustomization[]) Method
Name of map that contains layer you want to update.
ID or name of layer to update. If more than one layer is found with specified ID or name then SDK will throw MBO.MBOException with MBO.ErrorCode.AmbiguousLayerIdOrName error code.
Data table with new data.
Cancellation tracker. Optional. You can provide custom solution to break time-consuming processing. See ICancelTracker interface.
Data update options. Optional. Default value is MBO.UpdateDataOptions.None.
Folder where specified map is located. Optional. Default value is MBO.MapFolder.MyMaps.
Specifies what fields to add in data update and their customizations (fields that exist in the Data table but not in the layer). Optional. Applicable only if options includes MBO.UpdateDataOptions.AddNew. If this parameter value is not set then all new fields will be added to the layer. If you want instead to skip all fields then pass empty array in this parameter. To include a field without customization just set field's MBO.FieldCustomization.Name property in the parameter.
Updates the layer's data using specified data table.
Syntax
'Declaration
 
Overloads Function UpdateData( _
   ByVal mapName As String, _
   ByVal layerIdOrName As String, _
   ByVal dataTable As DataTable, _
   Optional ByVal cancelTracker As ICancelTracker, _
   Optional ByVal options As UpdateDataOptions, _
   Optional ByVal mapFolder As String, _
   Optional ByVal newFields() As FieldCustomization _
) As UpdateDataSummary

Parameters

mapName
Name of map that contains layer you want to update.
layerIdOrName
ID or name of layer to update. If more than one layer is found with specified ID or name then SDK will throw MBO.MBOException with MBO.ErrorCode.AmbiguousLayerIdOrName error code.
dataTable
Data table with new data.
cancelTracker
Cancellation tracker. Optional. You can provide custom solution to break time-consuming processing. See ICancelTracker interface.
options
Data update options. Optional. Default value is MBO.UpdateDataOptions.None.
mapFolder
Folder where specified map is located. Optional. Default value is MBO.MapFolder.MyMaps.
newFields
Specifies what fields to add in data update and their customizations (fields that exist in the Data table but not in the layer). Optional. Applicable only if options includes MBO.UpdateDataOptions.AddNew. If this parameter value is not set then all new fields will be added to the layer. If you want instead to skip all fields then pass empty array in this parameter. To include a field without customization just set field's MBO.FieldCustomization.Name property in the parameter.

Return Value

Information on data update.
See Also

Reference

IServer Interface
IServer Members
Overload List
MBO.Server.IServer.UpdateData(System.String, System.String, System.String, MBO.ICancelTracker, System.String, MBO.UpdateDataOptions, System.String)